<div class="block">
	<div class="hd">
		<h2>What's Going On?</h2>
	</div>
	<div class="bd">
		<ul id="theList" class="theList">
		<?=$goingonlist;?>
	</ul>
	</div>
</div>

</div></div></div>

<div id="sidebar" class="yui-b">
	<?php if ($missedcomingup):?>
		<div class="block">
			<div class="hd">
				<h2 class="missed">Missed Deadlines</h2>
			</div>
			<div class="bd">
				<ul class="theList">
				<?php foreach($missedcomingup as $key => $task):?>
					<?php if ($task->deadline) $update_type = 'deadline'; else if ($task->milestone) $update_type = 'milestone'; else $update_type = 'task';?>
					<li class="clearfix" id="activity-<?=$task->id;?>">

						<p><a href="" class="complete">Set as Complete</a><span class="<?=$update_type;?>"><?=$update_type;?></span>&nbsp;&nbsp;&nbsp;<strong><?=date('d/m/Y', strtotime($task->dateapplicable));?></strong></p>

						<div class="content"><h3><a href="<?=site_url('jobs/showUpdates/'.$task->jobid);?>"><?=$task->activity_title;?></a> on <a href="<?=site_url('jobs/view/'.$task->jobid);?>"><?=$task->job_title;?></a> for <a href="<?=site_url('companies/view/'.$task->companyid);?>"><?=$task->company_name;?></a></h3>
						</div>
					</li>
				<?php endforeach;?>
				</ul>
			</div>
		</div>
<?php endif;?>

<?php if (strlen(trim($cominguplist))):?>
<div class="block">
	<div class="hd">
		<h2 class="upcoming">Upcoming Deadlines</h2>
	</div>
	<div class="bd">
		<ul id="theList"  class="theList">
		<?=$cominguplist;?>
		</ul>
	</div>
</div>
<?php endif;?>